package net.protocol.diameter.dictionary;

/**
 * <pre>
 * &lt;?xml version="1.0" encoding="UTF-8"?&gt;
 * &lt;dictionary&gt;
 *   &lt;avps standard="Base"&gt;
 *     &lt;define code="263" name="Session-Id" type="UTF8String"&gt;
 *       &lt;rule mandatory="MUST" protect="MAY" vendor="MUSTNOT" encrypt="true"/&gt;
 *     &lt;/define&gt;
 *     &lt;define code="266" name="Vendor-Id" type="Unsigned32"&gt;
 *       &lt;rule mandatory="MUST" protect="MAY" vendor="MUSTNOT"/&gt;
 *     &lt;/define&gt;
 *   &lt;/avps&gt;
 *
 *   &lt;avps standard="CC"&gt;
 *     &lt;define code="411" name="CC-Correlation-Id" type="OctetString"&gt;
 *       &lt;rule mandatory="MAY" protect="MAY" vendor="MUSTNOT" encrypt="true"/&gt;
 *     &lt;/define&gt;
 *     &lt;define code="423" name="Cost-Information" type="Grouped"&gt;
 *       &lt;rule mandatory="MUST" protect="MAY" vendor="MUSTNOT" encrypt="true"/&gt;
 *     &lt;/define&gt;
 *   &lt;/avps&gt;
 * &lt;/dictionary&gt;
 * </pre>
 *
 * @author jinhongw@gmail.com
 */
public interface AVPFormatFactory {

    /**
     * Default vendorId is zero
     *
     * @param code AVP Code
     * @return Diameter AVP Format
     */
    AVPFormat get(int code);

    /**
     * @param vendorId Vendor Id
     * @param code AVP Code
     * @return Diameter AVP Format
     */
    AVPFormat get(int vendorId, int code);
}